package com.provider;

import com.saohuobang.test.util.AppConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Main
{
    private static Logger logger = LoggerFactory.getLogger(Main.class);

	public static void main(String... anArgs) throws Exception
    {
        logger.info("开始启动服务....");
        new Main().start();
        logger.info("服务启动成功....");
    }


	private WebServer server;
    
    public Main()
    {
        server = new WebServer(Integer.parseInt(AppConfig.getString("JETTY_PORT")));
    }
    
    public void start() throws Exception
    {
        server.start();
        server.join();
    }
}
